import { useEffect } from "react";
import { useModel } from "umi";
import { useReactive } from "ahooks";
import compress from "gql-compress";

const useAllCommoditiesClass = () => {
	const { graphqlFetch } = useModel("global");

	const state = useReactive({
		classifyloading: false,
		classify: [5, 1, 3, 3, 3, 3, 3],
	});

	const loadAllCommoditiesClass = async () => {
		state.classifyloading = true;

		state.classifyloading = false;
	};

	useEffect(() => {
		loadAllCommoditiesClass();
	}, []);

	return { ...state, loadAllCommoditiesClass };
};

let query = compress(``);

export default useAllCommoditiesClass;
